package com.markhsiu.bean;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

public class CommonBean implements InitializingBean, DisposableBean {

	private String commonName;

	public CommonBean() {
		System.out.println("Enter CommonBean's constructor   " + commonName);
	}

	public void setCommonName(String commonName) {
		System.out.println("set  " + commonName);
		this.commonName = commonName;
	}

	public void initMethod() {
		System.out.println("Enter CommonBean.initMethod(), commonName = " + commonName);
	}

	public void destroy() throws Exception {
		System.out.println("Enter LifecycleBean.destroy()");
	}

	public void afterPropertiesSet() throws Exception {
		System.out.println("Enter LifecycleBean.afterPropertiesSet()");
	}

	public void beanStart() {
		System.out.println("Enter LifecycleBean.beanStart()");
	}

	public void beanEnd() {
		System.out.println("Enter LifecycleBean.beanEnd()");
	}
}
